package com.xinhe.web.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.math.BigDecimal;

@Data
@Entity
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(description = "商品订单项详情")
@Table(name = "tb_order_item")
public class OrderItem {
    @Id
    @ApiModelProperty("id")
    private Long id;
    @ApiModelProperty("会员id")
    private Long userId;
    @ApiModelProperty("订单id")
    private Long orderId;
    @ApiModelProperty("商品id")
    private Long goodsId;
    @ApiModelProperty("商品规格id")
    private Long goodsPriceId;
    @ApiModelProperty("状态 SAVED(\"保存\"),\n" +
            "SHOP_CART(\"购物车\"),\n" +
            "UN_PAY(\"待付款\"),\n" +
            "PAYED(\"待发货\"),\n" +
            "SENDED(\"待收货\"),\n" +
            "RECEIVED(\"待评价\"),\n" +
            "COMMENTED(\"评论完成\"),\n" +
            "SERVICE_APPLY(\"申请售后\"),\n" +
            "SERVICE_SUCCESS(\"售后同意\"),\n" +
            "SERVICE_REJECT(\"售后拒绝\"),\n" +
            "REFUNDED(\"已退款\");")
    private String status;
    @ApiModelProperty("商品单价")
    private BigDecimal goodsPrice;
    @ApiModelProperty("商品数量")
    private Integer goodsAmount;
    @ApiModelProperty("订单项费用")
    private BigDecimal itemPrice = BigDecimal.ZERO;

    @ApiModelProperty("商品名称")
    private String goodsName;

    @ApiModelProperty("商品图标")
    private String iconPath;

    @ApiModelProperty("商品描述")
    private String goodsDes;

    @ApiModelProperty("专区类型 0普通 1帮扶 2家园 3链动 4易品")
    private Integer zoneType = Integer.valueOf(0);
}
